<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWashroomsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('washrooms', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->default('公共厕所')->comment('标题')->nullable();
            $table->string('coverimage')->comment('封面图片')->nullable();
            $table->string('tag')->comment('标语')->nullable();
            $table->string('address')->comment('地址')->nullable();
            $table->string('lanter')->comment('经纬度')->nullable();
            $table->string('distance')->comment('距离')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('washrooms');
    }
}
